package chapter8.extend_.exercise;

public class Ex02 {
    public static void main(String[] args) {
        CC cc = new CC();
    }
}

class AA {
    public AA() {
        System.out.println("我是A类");
    }

}

class BB extends AA {
    public BB() {
        System.out.println("我是B类的无参构造器");
    }

    public BB(String name) {
        //super();
        System.out.println("我是BB类的有参构造器"+name);
    }
}
class CC extends BB{
    public CC() {
        this("hello");
        System.out.println("我是C类的无参构造函数");
    }
    public CC(String name){
        super("hahaha");
        System.out.println("我是C类的有参构造函数");

    }
}